<?
	$aid = 0;
	
	if (isset($_GET["aid"])) {
		$aid = $_GET["aid"]; 
	}
	
	if ($aid == 0) { // Todos os leilões
		
	} else { // Apenas o leilão especificado
	}
?>

<!-- I was getting an array like:
  Array
  (
      [COLUMNS] => Array
          (
              [0] => ID
              [1] => FIRST
              [2] => LAST
           )
      [DATA] => Array
          (
              [0] => Array
                    (
                          [0] => 10
                          [1] => Mary
                          [2] => Smith
                     )
               [1] => Array
                     (
                          [0] => 11
                          [1] => Joe
                          [2] => Black
                     )
               [2] => Array
                     (
                          [0] => 12
                          [1] => Tom
                          [2] => Green
                     )
               [3] => Array
       . . .

With lots more columns and data from a json_decode call to a Cold Fusion .cfc which returned a database query. This is easy to turn into a nice associative array with the following code: -->

<?php
/*  foreach ($results['DATA'] as $rowcount => $row){
     foreach ($row as $colcount => $col){
       $lines[$rowcount][$results['COLUMNS'][$colcount]]=$col;
     }
  }
*/
?>

<!-- to get:
Array
(
  [0] => Array
       (
          [ID]      => 10
          [FIRST] => Mary
          [LAST]  => Smith
        )
  [1] => Array
       (
         [ID]       => 11
         [FIRST]  => Joe
         [LAST]   => Black
       )
. . . etc.

I hope this helps someone. -->